﻿using System;
using System.Collections.Generic;
using System.Xml.Linq;
using Engine;
using Engine.Graphics;
using Engine.Media;
using Game;
using GameEntitySystem;
using TemplatesDatabase;
namespace Mekiasm
{
    public class MekiasmInit
    {
        //合成书 1010
        public static Dictionary<string, Texture2D> imgres = new Dictionary<string, Texture2D>();
        public static DynamicArray<BlockMesh> faceMeshes = new DynamicArray<BlockMesh>();
        public static DynamicArray<Vector3> faceNormals = new DynamicArray<Vector3>();
        public static Dictionary<int, MekBlock> MekBlocks = new Dictionary<int, MekBlock>();
        public static BitmapFont mfont;

        public static Model CubeModel;

        public const string categories_pipe = "Mek科技-管道";
        public const string categories_machine = "Mek科技-机器";
        public const string categories_items = "Mek科技-物品";
        public const string categories_hedian = "Mek科技-核电";
        public const string categories_terrain = "Mek科技-地形";
        public const string categories_base_plant = "Plants";
        public const string categories_base_terrain = "Terrain";
        public const string categories_base_item = "Items";
        public const string categories_base_clothing = "Clothes";
        public const string categories_base_tool = "Tools";
        public const string categories_base_food = "Foods";
        public const string categories_base_construction = "Construction";
        public const string R1 = "材料";
        public const string R2 = "工具";
        public const string R3 = "核辐射";
        public const string R4 = "核燃料";
        public const string R5 = "机器升级";
        public const string R6 = "金属板";
        public const string R7 = "金属锭";
        public const string R8 = "金属粉";
        public const string R9 = "金属外壳";
        public const string R10 = "食物";
        public const string R11 = "资源";
        public const string R12 = "衣服";
        public const string 电池 = "电池";
        public const string itemFlatPath = "Mekiasm/Textures/Items/";

        public static Texture2D GetTexture(string path)
        {
            return ContentManager.Get<Texture2D>(path);
        }
        public static Texture2D GetFlatTexture(string R, string path)
        {
            return ContentManager.Get<Texture2D>(itemFlatPath + R + "/" + path);
        }

        public static void init_()
        {
            mfont = LabelWidget.BitmapFont;
        }
    }
}
